package com.frame.util;

import java.lang.reflect.Field;

import com.frame.database.JdataBean;

public class DataBeanUtils {


	public static JdataBean beanToMap(Object bean) throws Exception{
		JdataBean dbean=new JdataBean();
		Field[] field=bean.getClass().getDeclaredFields();
		for(int f=0;f<field.length;f++){
			String fname=field[f].getName();
			Object val=BeanUtils.getValue(bean, fname);
			dbean.put(fname, val);
		}
		return dbean;
	}
}
